<admintpl file="header" />
	<style>
		.center {
			text-align: center!important;
		}

		.select_area {
			width: 120px!important;
			height: 1.5rem;
			line-height: .2rem;
			display: inline-block;
			color: #707070;
			font-size: .14rem;
			padding: .05rem .08rem;
			border: 1px solid #707070;
			letter-spacing: .02rem;
			border-radius: .1rem;
			margin: 0 .07rem;
			margin-bottom: .1rem;
		}
	</style>
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="javascript:;">项目列表</a></li>
		</ul>
		<form class="well form-search" method="post" action="{:U('Xiaoqu/Adminxiaoqu/index')}">
			分类：
			<select name="category_id" style="width: 120px;">
				<option value='0'>全部</option>
				<volist name="categorys" id="vo">
					<option value="{$vo.id}" {$formget['category_id'] == $vo['id'] ? 'selected' : ''}>{$vo.name}</option>
				</volist>
			</select>&nbsp;
            名称：
            <input type="text" name="name" style="width: 150px;" value="{$formget.name|default=''}">
			城市：
			<div id="areaInfo" style="display: inline-block;">
				<input type="hidden" name="city_id">
			</div>
			建筑年代：
			<select name="year" style="width: 120px;">
				<option value='0'>全部</option>
				<option value='1'>1995年以前</option>
				<option value='2'>1995-2000年</option>
				<option value='3'>2001-2005年</option>
				<option value='4'>2006-2010年</option>
				<option value='5'>2010年以后</option>
			</select>
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="{:U('Xiaoqu/Adminxiaoqu/index')}">清空</a>
		</form>


		<form class="js-ajax-form" action="" method="post">
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="50">ID</th>
						<th width="50">名称</th>
						<th width="50">地址</th>
						<th width="50">价格</th>
						<th width="50">分类</th>
						<th width="50">城市</th>
						<th width="70">操作</th>
					</tr>
				</thead>
				<foreach name="lists" item="vo">
				<tr>
                    <td>{$vo.id}</td>
					<td>{$vo.name}</td>
					<td>{$vo.addr}</td>
					<td class="center">{$vo.price}</td>
					<td class="center">{$vo.category_names}</td>
					<td class="center">{$vo.city_name}</td>
					<td>
						<a href="{:U('Xiaoqu/Adminxiaoqu/edit_xiaoqu',array('id'=>$vo['id']))}">编辑</a> |
						<a href="{:U('Xiaoqu/Adminxiaoqu/edit_xiaoqu',array('id'=>$vo['id'], 'del' => 1))}" class="js-ajax-delete">删除</a>
					</td>
				</tr>
				</foreach>
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script src="__PUBLIC__/js/area.js"></script>
	<script>
        var area = {$area};
        area = eval(area);

        var areaPath = {$path ? $path : []};
        areaPath = eval(areaPath);

        $(function () {
            // 地址选择select的初始化
            initArea(3);
        })
	</script>
</body>
</html>